<%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
<%@page import="java.util.List"%>
<%@page import ="java.util.List"%>
<%@page import ="com.situ.student.entity.Banji" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<link rel="stylesheet" type="text/css" href="lib/bootstrap-3.3.7-dist/css/bootstrap.css"/>
	<script type="text/javascript" src="lib/jquery/jquery-1.11.1.js" ></script>
	<script type="text/javascript" src="lib/bootstrap-3.3.7-dist/js/bootstrap.js" ></script>
	<style type="text/css">
	.align-center{
	    width: 800px;
		margin : 10px auto;
	}
	table{
		table-layout : fixed;
		word-break : break-all;
	}
</style>
	
</head>
<body>
	
	<%
		List<Banji> list=(List<Banji>)request.getAttribute("list");
	%>
	
		<a href="/Java823Web/Banji_add.jsp">添加</a>
	
	<form>
			<table border="1" cellspacing="0">
				<tr>
					<td>ID</td>
					<td>班级名</td>
					<td>修改</td>
					<td>删除</td>
				</tr>
				<%
					for(Banji banji:list) {
				%>
				<tr>
					<td><%=banji.getId()%></td>
					<td><%=banji.getName() %></td>
					<td>
						<a href="<%=request.getContextPath()%>/BanjiServlet?method=toupdate&id=<%=banji.getId()%>">修改</a>
					</td>
					<td>
						<a href="/Java823Web/BanjiServlet?method=deleteById&id=<%=banji.getId()%>">删除</a>
					</td>
				</tr>
				<%
					}
				%>
			</table>
		</form>
</body>
</html>